﻿using EFDemo.ContextDemo.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace EFDemo.ContextDemo.ModelMapConfigs
{
    public class ComputerMapConfig : IEntityTypeConfiguration<Computer>
    {
        public void Configure(EntityTypeBuilder<Computer> builder)
        {
            builder.HasKey(c => c.Id);
            builder.Property(c => c.Name).HasMaxLength(64);
            builder.Property(c => c.SerialNo).HasMaxLength(64);
        }
    }
}
